<?php
namespace admin\models;

use common\models\Banner;
use common\models\SearchInterface;
use common\models\SearchTrait;

class BannerSearch extends Banner implements SearchInterface
{
    use SearchTrait;

    public function rules()
    {
        return [
            [['des'], 'trim']
        ];
    }

    public function prepareQuery($query)
    {
        return $query->andFilterWhere(['like', 'des', $this->des])
            ->orderBy('display_order desc');
    }
}
